#!/bin/sh

host=localhost
user=accftp
pswd=accecm123
ddir=/data/acc001

wget -O ${ddir}/NSYUMEI.TXT -q --user=${user} --password=${pswd} ftp://${host}/NSYUMEI.TXT
if [ $? -ne 0 ]; then echo "ftp error" & exit $?; fi

wget -O ${ddir}/NSYUGOK.TXT -q --user=${user} --password=${pswd} ftp://${host}/NSYUGOK.TXT
if [ $? -ne 0 ]; then rm ${ddir}/NSYUMEI.TXT & echo "ftp error" & exit $?; fi

mv -f ${ddir}/NSYUMEI.TXT ${ddir}/import_export_data.txt
mv -f ${ddir}/NSYUGOK.TXT ${ddir}/export_data.txt

